A programmable controller reads or writes device data that is included in the programmable controller according to a sequence program created by a user. In response thereto, for example, a state of an input device connected to the programmable controller such as a relay, a switch, and a sensor is acquired, or an output device such as an actuator and a valve is controlled. For example, recipe data such as the size and color of a manufactured product and results data such as the number of production and the number of defective products for each manufactured product are also stored as the device data. Therefore, when an operator creates a sequence program and acquires data required for controlling an input/output device from the recipe data, products can be flexibly changed. Further, when a sequence program is created so as to store the control result as the results data, it is easy to perform stock management of members required for production.
Data such as the recipe data and the results data is generally stored in a programmable controller in a two-dimensional data table (hereinafter, “table”) format such as CSV (Comma Separated Values) so as to be easily processed by a high-level computer system. When the programmable controller accesses the data, the programmable controller needs to read the data into a device memory. To uniquely identify table data (such as the recipe data and the results data) functioning as an element of a table, a column number and a row number of the table may be specified. However, the device memory does not have any columns and rows, the table data is only successively provided thereon, and thus when the programmable controller accesses the device data on the device memory, it is necessary to calculate a device address.
Conventionally, a technique is proposed in which one-dimensional data can be processed as two-dimensional table data also in a programmable controller (for example, Patent Literature 1). In this technique, a table definition command that includes a table identification number, the number of table columns, the number of table rows, and a head device address of a table is defined first for each table. An element is then extracted from the one-dimensional data by a table element read command to specify a read target element using a column number and a row number on the two-dimensional table data as parameters. The device address of the read target element on a device memory is calculated by using the head device address and the number of table rows of the table definition command and a column number and a row number of the table element read command.